package com.zsy.provider;

import com.zsy.provider.api.feign.UacFeignApi;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication(exclude={DataSourceAutoConfiguration.class})//禁用数据源
@EnableDiscoveryClient
@EnableFeignClients
@EnableSwagger2
//该启动类暂时不能移动到com.zsy 包下，会自动扫描dao数据，由于本项目不需要连接数据源所以放到provider里 ，但是需要扫描其他的包，可以用packagesan包里扫描即可
public class DemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }

    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
